﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EMTManagement.aspx.cs" Inherits="MedicareWebUI.EMTManagement" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        Current pending events:<br />
    
        <asp:GridView ID="gridEvents" runat="server" AutoGenerateColumns="False" 
            CellPadding="4" DataSourceID="EventDataSource" ForeColor="#333333" 
            DataKeyNames="idEvent" ShowHeaderWhenEmpty="True" 
            onselectedindexchanged="GridEvents_SelectedIndexChanged" 
            AllowPaging="True">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:CommandField ShowSelectButton="True" />
                <asp:BoundField DataField="idEvent" HeaderText="Event ID" 
                    SortExpression="idEvent" />
                <asp:BoundField DataField="patient" HeaderText="Patient" 
                    SortExpression="patient" />
                <asp:BoundField DataField="colorCode" HeaderText="Color Code" 
                    SortExpression="colorCode"/>
                <asp:BoundField DataField="status" HeaderText="Status" 
                    SortExpression="status" />
                <asp:BoundField DataField="comments" HeaderText="Comments" 
                    SortExpression="comments" />
            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
        <asp:ObjectDataSource ID="EventDataSource" runat="server" 
            SelectMethod="getPendingEventsInfo" TypeName="MedicareDataAccess.EventDAO">
        </asp:ObjectDataSource>
    
        <br />
        <asp:Button ID="btnEMT" runat="server" onclick="btnEMT_Click" 
            Text="Send EMT Team" />
    
        &nbsp; Selected event:
    
        <asp:Label ID="lblInsertID" runat="server" Text="0"></asp:Label>
    
        <br />
        <br />
        <asp:Label ID="lblOutcome" runat="server" Text="EMT Team Sent"></asp:Label>
    
    </div>
    <div>
        <br />
        Events with EMT teams assigned:
        <asp:GridView ID="gridEvents2" runat="server" AutoGenerateColumns="False" 
            CellPadding="4" DataSourceID="EventDataSource2" ForeColor="#333333" 
            GridLines="None" ShowHeaderWhenEmpty=True AllowPaging="True">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:BoundField DataField="idEvent" HeaderText="Event ID" 
                    SortExpression="idEvent" />
                <asp:BoundField DataField="patient" HeaderText="Patient" 
                    SortExpression="patient" />
                <asp:BoundField DataField="colorCode" HeaderText="Color Code" 
                    SortExpression="colorCode" />
                <asp:BoundField DataField="status" HeaderText="Status" 
                    SortExpression="status" />
                <asp:BoundField DataField="comments" HeaderText="Comments" 
                    SortExpression="comments" />
            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
        <asp:ObjectDataSource ID="EventDataSource2" runat="server" 
            SelectMethod="getProcessedEventsInfo" TypeName="MedicareDataAccess.EventDAO">
        </asp:ObjectDataSource>
        <br />
    </div>
    <p>
        Finished Events:</p>
    <p>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
            AutoGenerateColumns="False" CellPadding="4" DataSourceID="EventsDataSource3" 
            ForeColor="#333333" GridLines="None" ShowHeaderWhenEmpty="true">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:BoundField DataField="idEvent" HeaderText="Event ID" 
                    SortExpression="idEvent" />
                <asp:BoundField DataField="patient" HeaderText="Patient" 
                    SortExpression="patient" />
                <asp:BoundField DataField="colorCode" HeaderText="Color Code" 
                    SortExpression="colorCode" />
                <asp:BoundField DataField="status" HeaderText="Status" 
                    SortExpression="status" />
                <asp:BoundField DataField="comments" HeaderText="Comments" 
                    SortExpression="comments" />
            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
        <asp:ObjectDataSource ID="EventsDataSource3" runat="server" 
            SelectMethod="getFinishedEventsInfo" TypeName="MedicareDataAccess.EventDAO">
        </asp:ObjectDataSource>
    </p>
    <p>
        &nbsp;</p>
    <asp:Button ID="btnPatient" runat="server" onclick="btnPatient_Click" 
        Text="Patient Management" />
    <asp:Button ID="btnEvent" runat="server" onclick="btnEvent_Click" 
        Text="Event Management" />
    </form>
    </body>
</html>
